package edu.purdue.cs.ds.vss;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;

public class CertifiedMessage implements Serializable{

	/**
	 * For the compiler
	 */
	private static final long serialVersionUID = 8522827208292258092L;
	private int v;
	private ArrayList<BigInteger> a;
	private int index;
	private ArrayList<BigInteger> lambdaList;
	private ArrayList<VerifiedMessage> M;
	public String destination;
	public String source;
	private byte[] signature = null;
	private boolean sigValid = false;
	
	public CertifiedMessage(int vp, int ip, ArrayList<BigInteger> ap,
								ArrayList<BigInteger> lp, ArrayList<VerifiedMessage> mp){
		
		v = vp;
		index = ip;
		a = ap;
		lambdaList = lp;
		M = mp;
	}

	public int getV() {
		return v;
	}

	public void setV(int v) {
		this.v = v;
	}

	public ArrayList<BigInteger> getA() {
		return a;
	}

	public void setA(ArrayList<BigInteger> a) {
		this.a = a;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public ArrayList<BigInteger> getLambdaList() {
		return lambdaList;
	}

	public void setLambdaList(ArrayList<BigInteger> lambdaList) {
		this.lambdaList = lambdaList;
	}

	public ArrayList<VerifiedMessage> getM() {
		return M;
	}

	public void setM(ArrayList<VerifiedMessage> m) {
		M = m;
	}

	public byte[] getSignature() {
		return signature;
	}

	public void setSignature(byte[] signature) {
		this.signature = signature;
	}

	public boolean isSigValid() {
		return sigValid;
	}

	public void setSigValid(boolean sigValid) {
		this.sigValid = sigValid;
	}
}
